home *** CD-ROM | disk | FTP | other *** search
/ SuperView Productivity Suite 2 / SuperView Productivity Suite 2.iso / BONUS / Support / Install_Ghost / Install_GS510 < prev    next >
Encoding:
Text File  |  1998-06-19  |  12.8 KB  |  585 lines

  1. ; $VER: Install_GS510 1.01 (19.06.98)
  2. ; Script to install GhostScript V5.10
  3. ; Written from Manfred Tremmel
  4. ; ©1998 by MT Graphic & Design, Manfred Tremmel
  5.  
  6. (complete 0)
  7.  
  8. (set @default-dest "sys:")
  9.  
  10. ;=============================================================================
  11. ; Deutsche strings
  12. (if (= @language "deutsch")
  13. (
  14.    (set #bad-kick "Sie benötigen AMIGA OS 2.0+ zum Installieren von GhostScript!")
  15.  
  16.     (set #ask-dir    "Wohin soll GhostScript installiert werden?\nAchtung es wird kein Verzeichnis erstellt!")
  17.  
  18.     (set #ask-cpu "Welchen Prozessor haben Sie installiert?\nDas entsprechende Archiv muß vorhanden sein.")
  19.  
  20.     (set #exists " nicht vorhanden")
  21.  
  22.     (set #startuptext (cat  "\n\n\nUm mit GhostScript richtig arbeiten zu können "
  23.                                     "muß eine Änderung in der User-Startup vorgenommen werden.\n\n"))
  24.  
  25.     (set #ask-ps (cat "Bitte wählen Sie Ihren installierten Drucker, "
  26.                             "wenn dieser nicht vorhanden ist, wählen Sie ein Vorgängermodell, "
  27.                             "oder den Workbench-Druckertreiber"))
  28.     (set #ask0-ps "GhostScript mit Wokbench-Druckertreiber")
  29.     (set #ask1-ps "GhostScript-Direkt Epson")
  30.     (set #ask2-ps "GhostScript-Direkt HP")
  31.     (set #ask3-ps "GhostScript-Direkt Canon")
  32.  
  33.     (set #ask0-ps-epson "Epson 9 Nadel (oder kompatibel)")
  34.     (set #ask1-ps-epson "Epson 24 Nadel (oder kompatibel)")
  35.     (set #ask2-ps-epson "Epson Stylus (Color)")
  36.  
  37.     (set #ask0-ps-hp "HP DeskJet 500C/540C")
  38.     (set #ask1-ps-hp "HP DeskJet 550C/560C")
  39.     (set #ask2-ps-hp "HP PaintJet XL300/DeskJet 1200C")
  40.     (set #ask3-ps-hp "HP PaintJet")
  41.     (set #ask4-ps-hp "HP PaintJet XL")
  42.     (set #ask5-ps-hp "HP LaserJet")
  43.     (set #ask6-ps-hp "HP LaserJet Plus")
  44.     (set #ask7-ps-hp "HP LaserJet 2p")
  45.     (set #ask8-ps-hp "HP LaserJet 3")
  46.     (set #ask9-ps-hp "HP LaserJet 4")
  47.  
  48.     (set #ask0-ps-canon "Canon BJ10e")
  49.     (set #ask1-ps-canon "Canon BJ200")
  50.     (set #ask2-ps-canon "Canon BJC-600/4000/70/Stylewriter2x00")
  51.     (set #ask3-ps-canon "Canon BJC-800")
  52.  
  53.     (set #ask-papersize "Wählen Sie die maximale Papiergröße Ihres Druckers:")
  54.     (set papersize-default 6)
  55.  
  56.     (set #ask-printerport "Geben Sie die Schnittstelle, an der Ihr Drucker angeschlossen ist:")
  57. ))
  58. ;=============================================================================
  59. ; English strings
  60. (if (= @language "english")
  61. (
  62.    (set #bad-kick "To install GhostScript AMIGA OS 2.0+ is required!")
  63.  
  64.     (set #ask-dir    "Where do you want to install GhostScript?\nAttention, no drawer will be created!")
  65.  
  66.     (set #ask-cpu "Which Processor have you installed?\nThe corresponding archive must be present.")
  67.  
  68.     (set #exists " dosen't exist")
  69.  
  70.     (set #startuptext "\n\n\nTo work correctly with GhostScript User-Startup must be changed\n\n")
  71.  
  72.     (set #ask-ps (cat "Please choose your installed printer, "
  73.                             "if it isn't in the list, select the predecessor printer "
  74.                             "or the Workbench-Printerdriver"))
  75.     (set #ask0-ps "GhostScript with Workbench-Printerdriver")
  76.     (set #ask1-ps "GhostScript-Direct Epson")
  77.     (set #ask2-ps "GhostScript-Direct HP")
  78.     (set #ask3-ps "GhostScript-Direct Canon")
  79.  
  80.     (set #ask0-ps-epson "Epson 9 Nadel (or compatible)")
  81.     (set #ask1-ps-epson "Epson 24 Nadel (or compatible)")
  82.     (set #ask2-ps-epson "Epson Stylus (Color)")
  83.  
  84.     (set #ask0-ps-hp "HP DeskJet 500C/540C")
  85.     (set #ask1-ps-hp "HP DeskJet 550C/560C")
  86.     (set #ask2-ps-hp "HP PaintJet XL300/DeskJet 1200C")
  87.     (set #ask3-ps-hp "HP PaintJet")
  88.     (set #ask4-ps-hp "HP PaintJet XL")
  89.     (set #ask5-ps-hp "HP LaserJet")
  90.     (set #ask6-ps-hp "HP LaserJet Plus")
  91.     (set #ask7-ps-hp "HP LaserJet 2p")
  92.     (set #ask8-ps-hp "HP LaserJet 3")
  93.     (set #ask9-ps-hp "HP LaserJet 4")
  94.  
  95.     (set #ask0-ps-canon "Canon BJ10e")
  96.     (set #ask1-ps-canon "Canon BJ200")
  97.     (set #ask2-ps-canon "Canon BJC-600/4000/70/Stylewriter2x00")
  98.     (set #ask3-ps-canon "Canon BJC-800")
  99.  
  100.     (set #ask-papersize "Choose maximum papersize, your printer can handle:")
  101.     (set papersize-default 0)
  102.  
  103.     (set #ask-printerport "Which port your printer is joined:")
  104. ))
  105.  
  106. ;=============================================================================
  107. ; Sicherstellen, daß mindestens OS2.0 (V37) installiert ist
  108.  
  109. (if (< (/ (getversion) 65536) 37)
  110.   (abort #bad-kick)
  111. )
  112.  
  113.  
  114. ;=============================================================================
  115. ; Verzeichnis auswählen:
  116.  
  117. (set target_dir
  118.     (askdir    (prompt #ask-dir @askdir)
  119.                 (help @askdir-help)
  120.                 (default @default-dest)
  121.                 (disk)
  122.     )
  123. )
  124. (set @default-dest target_dir)
  125.  
  126. ;=============================================================================
  127. ; Prüfen des Porzessors, um die entsprechende Version auszuwaehlen.
  128.  
  129. (set CPUSet 0)
  130. (set CPUStr (database "cpu"))
  131. (set FPUStr (database "fpu"))
  132. (if (>= CPUStr "68020")
  133.     (if (>= CPUStr "68040")
  134.         (set CPUSet 3)
  135.         ((if (= FPUStr "NOFPU")
  136.             (set CPUSet 1)
  137.             (set CPUSet 2)
  138.         ))
  139.     )
  140. )
  141.  
  142. (set CPUSet
  143.     (askchoice  (prompt #ask-cpu)
  144.                     (help "")
  145.                     (choices "68000/68010"
  146.                                 "68020/68030"
  147.                                 "68020/68030 + FPU"
  148.                                 "68040/68060"
  149.                     )
  150.                     (default CPUSet)
  151.     )
  152. )
  153.  
  154. (set CPUArchiv
  155.     (select CPUSet    "GS510_000.lha"
  156.                         "GS510_020.lha"
  157.                         "GS510_020fpu.lha"
  158.                         "GS510_040fpu.lha"
  159.                         ""
  160.     )
  161. )
  162. (set CPUProgramm
  163.     (select CPUSet    "gs_000"
  164.                         "gs_020"
  165.                         "gs_020fpu"
  166.                         "gs_040fpu"
  167.                         ""
  168.     )
  169. )
  170.  
  171. ;=============================================================================
  172. ; Abfrage, welcher Drucker installiert ist.
  173.  
  174. (set pstype
  175.     (askchoice (prompt #ask-ps)
  176.         (help "")
  177.         (choices #ask0-ps
  178.                     #ask1-ps
  179.                     #ask2-ps
  180.                     #ask3-ps
  181.         )
  182.         (default 0)
  183.     )
  184. )
  185.  
  186. (set PSPrSc "GSZusatz/GhostPrint_PrefPrinter")
  187.  
  188. (if (= pstype 1)
  189.     (
  190.         (set pstypedr
  191.             (askchoice (prompt #ask-ps)
  192.                 (help #ask-ps-help)
  193.                 (choices #ask0-ps
  194.                             #ask0-ps-epson
  195.                             #ask1-ps-epson
  196.                             #ask2-ps-epson
  197.                 )
  198.                 (default 0)
  199.             )
  200.         )
  201.         (set PsPrSc
  202.             (select pstypedr    "GSZusatz/GhostPrint_PrefPrinter"
  203.                                     "GSZusatz/GhostPrint_EPS9N"
  204.                                     "GSZusatz/GhostPrint_EPS24N"
  205.                                     "GSZusatz/GhostPrint_SC"
  206.                                     ""
  207.             )
  208.         )
  209.     )
  210. )
  211.  
  212. (if (= pstype 2)
  213.     (
  214.         (set pstypedr
  215.             (askchoice (prompt #ask-ps)
  216.                 (help #ask-ps-help)
  217.                 (choices #ask0-ps
  218.                             #ask0-ps-hp
  219.                             #ask1-ps-hp
  220.                             #ask2-ps-hp
  221.                             #ask3-ps-hp
  222.                             #ask4-ps-hp
  223.                             #ask5-ps-hp
  224.                             #ask6-ps-hp
  225.                             #ask7-ps-hp
  226.                             #ask8-ps-hp
  227.                             #ask9-ps-hp
  228.                 )
  229.                 (default 0)
  230.             )
  231.         )
  232.         (set PsPrSc
  233.             (select pstypedr    "GSZusatz/GhostPrint_PrefPrinter"
  234.                                     "GSZusatz/GhostPrint_CDJ500"
  235.                                     "GSZusatz/GhostPrint_CDJ550"
  236.                                     "GSZusatz/GhostPrint_PJXL300"
  237.                                     "GSZusatz/GhostPrint_PJTEST"
  238.                                     "GSZusatz/GhostPrint_PJXLTEST"
  239.                                     "GSZusatz/GhostPrint_LASERJET"
  240.                                     "GSZusatz/GhostPrint_LJETPLUS"
  241.                                     "GSZusatz/GhostPrint_LJET2P"
  242.                                     "GSZusatz/GhostPrint_LJET3"
  243.                                     "GSZusatz/GhostPrint_LJET4"
  244.                                     ""
  245.             )
  246.         )
  247.     )
  248. )
  249. (if (= pstype 3)
  250.     (
  251.         (set pstypedr
  252.             (askchoice (prompt #ask-ps)
  253.                 (help #ask-ps-help)
  254.                 (choices #ask0-ps
  255.                             #ask0-ps-canon
  256.                             #ask1-ps-canon
  257.                             #ask2-ps-canon
  258.                             #ask3-ps-canon
  259.                 )
  260.                 (default 0)
  261.             )
  262.         )
  263.         (set PsPrSc
  264.             (select pstypedr    "GSZusatz/GhostPrint_PrefPrinter"
  265.                                     "GSZusatz/GhostPrint_BJ10E"
  266.                                     "GSZusatz/GhostPrint_BJ200"
  267.                                     "GSZusatz/GhostPrint_BJC600"
  268.                                     "GSZusatz/GhostPrint_BJC800"
  269.                                     ""
  270.             )
  271.         )
  272.     )
  273. )
  274.  
  275. ;=============================================================================
  276. ; Überprüfen, ob die Archive vorhanden sind
  277.  
  278. (if (<> (exists "GS510-data.lha" (noreq)) 1)
  279.     (abort (cat "GS510-data.lha" #exists))
  280. )
  281.  
  282. (if (<> (exists "GS510-fonts-st.lha" (noreq)) 1)
  283.     (abort (cat "GS510-fonts-st.lha" #exists))
  284. )
  285.  
  286. (if (<> (exists "GS510FontMap.lha" (noreq)) 1)
  287.     (abort (cat "GS510FontMap.lha" #exists))
  288. )
  289.  
  290. (if (<> (exists CPUArchiv (noreq)) 1)
  291.     (abort (cat CPUArchiv #exists))
  292. )
  293.  
  294. ;=============================================================================
  295. ; ENV-Variablen auslesen, abfragen und setzen
  296.  
  297. (set printerport "par:")
  298.  
  299. (if (= (exists "env:gsport") 1)
  300.     (set printport (getenv "env:gsport"))
  301. )
  302. (if (= (exists "env:gspapersize") 1)
  303.     (
  304.         (set papersize (getenv "env:gspapersize"))
  305.         (set m 0)
  306.         (while (< m 25)
  307.             (if (= papersize
  308.                     (select m    "letter"
  309.                                     "legal"
  310.                                     "a0"
  311.                                     "a1"
  312.                                     "a2"
  313.                                     "a3"
  314.                                     "a4"
  315.                                     "a5"
  316.                                     "a6"
  317.                                     "a7"
  318.                                     "a8"
  319.                                     "a10"
  320.                                     "b0"
  321.                                     "b1"
  322.                                     "b2"
  323.                                     "b3"
  324.                                     "b4"
  325.                                     "b5"
  326.                                     "archA"
  327.                                     "archB"
  328.                                     "archC"
  329.                                     "flsa"
  330.                                     "flse"
  331.                                     "halfletter"
  332.                                     "11x17"
  333.                                     "ledger"
  334.                                     ""
  335.                     )
  336.                 )
  337.                 (
  338.                     (set papersize-default m)
  339.                     (set m 25)
  340.                 )
  341.             )
  342.             (set m (+ m 1))
  343.         )
  344.     )
  345. )
  346.  
  347. (set papersize-default
  348.     (askchoice (prompt #ask-papersize)
  349.         (help "")
  350.         (choices    "letter"
  351.                     "legal"
  352.                     "a0"
  353.                     "a1"
  354.                     "a2"
  355.                     "a3"
  356.                     "a4"
  357.                     "a5"
  358.                     "a6"
  359.                     "a7"
  360.                     "a8"
  361.                     "a10"
  362.                     "b0"
  363.                     "b1"
  364.                     "b2"
  365.                     "b3"
  366.                     "b4"
  367.                     "b5"
  368.                     "archA"
  369.                     "archB"
  370.                     "archC"
  371.                     "flsa"
  372.                     "flse"
  373.                     "halfletter"
  374.                     "11x17"
  375.                     "ledger"
  376.         )
  377.         (default papersize-default)
  378.     )
  379. )
  380.  
  381. (set papersize
  382.     (select papersize-default
  383.         "letter"
  384.         "legal"
  385.         "a0"
  386.         "a1"
  387.         "a2"
  388.         "a3"
  389.         "a4"
  390.         "a5"
  391.         "a6"
  392.         "a7"
  393.         "a8"
  394.         "a10"
  395.         "b0"
  396.         "b1"
  397.         "b2"
  398.         "b3"
  399.         "b4"
  400.         "b5"
  401.         "archA"
  402.         "archB"
  403.         "archC"
  404.         "flsa"
  405.         "flse"
  406.         "halfletter"
  407.         "11x17"
  408.         "ledger"
  409.         ""
  410.     )
  411. )
  412. (run (cat "setenv gspapersize " papersize))
  413. (copyfiles    (source "ENV:gspapersize")
  414.                 (dest "ENVARC:")
  415. )
  416.  
  417. (set printerport
  418.     (askstring
  419.         (prompt #ask-printerport)
  420.         (help @askstring-help)
  421.         (default printerport)
  422.     )
  423. )
  424. (run (cat "setenv gsport " printerport))
  425. (copyfiles    (source "ENV:gsport")
  426.                 (dest "ENVARC:")
  427. )
  428.  
  429. ;=============================================================================
  430. ; Entpacken des Hauptprogramms und kopieren ins Zielverzeichnis
  431.  
  432. (run (CAT "lha x -r " CPUArchiv " t:"))
  433. (complete 10)
  434.  
  435. (copylib    (prompt "GhostScript" @copylib)
  436.             (help   @copylib-help)
  437.             (source (cat "t:ghostscript/5.10/" CPUProgramm))
  438.             (dest target_dir)
  439.             (newname "gs")
  440.             (confirm 2)
  441. )
  442. (complete 20)
  443.  
  444. (run "delete <>NIL: t:ghostscript all")
  445. (complete 25)
  446.  
  447. ;=============================================================================
  448. ; Entpacken des data-Archives und kopieren ins Zielverzeichnis
  449.  
  450. (run  "lha x -r GS510-data.lha t:")
  451. (complete 35)
  452.  
  453. (if (<> (exists (TACKON target_dir ("data")) (noreq)) 2)
  454.     (makedir ((TACKON target_dir ("data")))
  455.                 (infos)
  456.     )
  457. )
  458.  
  459. (copyfiles    (prompt "data" @copyfiles)
  460.                 (help   @copyfiles-help)
  461.                 (source "t:ghostscript/5.10/data")
  462.                 (dest  (TACKON target_dir "data"))
  463.                 (all)
  464. )
  465.  
  466. (copyfiles    (prompt "data" @copyfiles)
  467.                 (help   @copyfiles-help)
  468.                 (source "t:ghostscript/5.10")
  469.                 (dest  (TACKON target_dir "data"))
  470.                 (pattern "#?.ps")
  471. )
  472.  
  473. (complete 45)
  474.  
  475. (run "delete <>NIL: t:ghostscript all")
  476. (complete 50)
  477.  
  478. ;=============================================================================
  479. ; Entpacken des fonts-st-Archives und kopieren ins Zielverzeichnis
  480.  
  481. (run  "lha x -r GS510-fonts-st.lha t:")
  482. (complete 60)
  483.  
  484. (if (<> (exists (TACKON target_dir ("fonts")) (noreq)) 2)
  485.     (makedir ((TACKON target_dir ("fonts")))
  486.                 (infos)
  487.     )
  488. )
  489.  
  490. (copyfiles    (prompt "fonts" @copyfiles)
  491.                 (help   @copyfiles-help)
  492.                 (source "t:fonts")
  493.                 (dest  (TACKON target_dir "fonts"))
  494.                 (all)
  495. )
  496.  
  497. (complete 70)
  498.  
  499. (run "delete <>NIL: t:fonts all")
  500. (complete 73)
  501.  
  502. (run  "lha x -r GS510FontMap.lha t:")
  503. (complete 74)
  504.  
  505. (copyfiles    (prompt "fontmap" @copyfiles)
  506.                 (help   @copyfiles-help)
  507.                 (source "t:ghostscript/gs5.10/Fontmap")
  508.                 (dest  (TACKON target_dir "data"))
  509.                 (all)
  510. )
  511. (run "delete <>NIL: t:ghostscript all")
  512. (complete 75)
  513.  
  514. ;=============================================================================
  515. ; Entpacken des fonts-ot-Archives und kopieren ins Zielverzeichnis
  516.  
  517. (if (= (exists "GS510-fonts-ot.lha" (noreq)) 1)
  518.     (
  519.         (run  "lha x -r GS510-fonts-ot.lha t:")
  520.         (complete 80)
  521.  
  522.         (copyfiles    (prompt "fonts" @copyfiles)
  523.                         (help   @copyfiles-help)
  524.                         (source "t:fonts")
  525.                         (dest  (TACKON target_dir "fonts"))
  526.                         (all)
  527.         )
  528.     )
  529. )
  530.  
  531. (complete 80)
  532.  
  533. (run "delete <>NIL: t:fonts all")
  534. (complete 85)
  535.  
  536. ;=============================================================================
  537. ; Anzeige und Druckscripts kopieren
  538.  
  539. (copyfiles    (prompt "GhostView" @copyfiles)
  540.                 (help   @copyfiles-help)
  541.                 (source "GSZusatz/GhostView")
  542.                 (dest  target_dir)
  543.                 (infos)
  544. )
  545.  
  546. (copyfiles    (prompt "GhostViewScreen" @copyfiles)
  547.                 (help   @copyfiles-help)
  548.                 (source "GSZusatz/GhostViewScreen")
  549.                 (dest  target_dir)
  550.                 (infos)
  551. )
  552.  
  553. (copyfiles    (prompt "GhostPrint" @copyfiles)
  554.                 (help   @copyfiles-help)
  555.                 (source PSPrSc)
  556.                 (dest  target_dir)
  557.                 (infos)
  558. )
  559.  
  560. (complete 90)
  561.  
  562. ;=============================================================================
  563. ; Eintrag in die User-Startup
  564.  
  565. (set command1 (cat "assign GhostScript: \"" target_dir "\""))
  566. (set command2 "assign PSFonts: GhostScript:fonts")
  567. (set command3 "path GhostScript: add")
  568.  
  569. (run command1)
  570. (run command2)
  571. (run command3)
  572.  
  573. (set commandtext (cat command1 "\n" command2 "\n" command3))
  574.  
  575. (startup "GhostScript"
  576.             (prompt (cat #startuptext commandtext))
  577.             (help "")
  578.             (command commandtext)
  579. )
  580.  
  581. (complete 100)
  582.  
  583. ;=============================================================================
  584. ; Fertig
  585.